<<<<<<< HEAD
<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:65:"C:\wamp200\www\xgwnew/application/index\view\order\wxpaytest.html";i:1536203477;}*/ ?>
=======
<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:65:"C:\wamp200\www\xgwnew/application/index\view\order\wxpaytest.html";i:1536479449;}*/ ?>
>>>>>>> df63b8e08acd14d1f9d8991f50e22eca3352cfef
<!DOCTYPE html>
<html data-dpr="1" style="font-size: 38px;">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title>付款</title>
<link rel="stylesheet" href="__PUBLIC__/xsd/css/mui.min.css">
<script src="__PUBLIC__/js/jquery.js"></script>
<script src="__PUBLIC__/xsd/js/mui.min.js"></script>
<script src="__PUBLIC__/xsd/js/flexible.js"></script>
<script src="__PUBLIC__/xsd/js/template.js"></script>

</head>
<!--/head-->
<body>

<style>

.complete-box { height: 100%; margin-bottom: -40px; background: #FFF;}

.complete-wrap { padding:15px 8px 0px; background: #FFF; }

.complete-wrap p.tips,.complete-wrap p.orderno{ font-size: 1.3em; color: #57b174; text-align: left; }



.complete-wrap p.orderno { margin-bottom: 3px; }

.complete-wrap table { margin: 0 auto; }

.complete-wrap table tr td { font-size: 1em; color: #57b174; text-align: left; }

.complete-wrap table tr td img { width: 30px; height: 30px; margin-right: 5px; vertical-align: middle; }

.complete-inner { padding: 10px 8px; margin-top: 15px;  margin-bottom: 50px; background: #f8f8f8; border: solid 1px #dddddd; }

.complete-inner-cancel { border-width: 0; background: none; }

.complete-fruit-box {  margin-bottom: 20px;  }

.complete-fruit-box img { display: block; margin: 0 auto 5px; }

.complete-fruit-box p { font-size: 0.875em; color:  #b2b2b2; text-align: center; }

.complete-top { padding-top: 15px; }

.complete-wrap p.content { display: block; margin-bottom: 20px;  font-size: 1em; color: #696969;  }

.complete-wrap p.content span { color: #57b174; }

.complete-wrap p.hot-line { margin-bottom: 0; color: #b2b2b2; font-size: 0.875em; }

.complete-wrap div.snap-up { font-size: 1.2em; color: #696969; }

.share-btn-cart { display: block; width: 42%; padding: 6px 12px; margin: 0 auto;  font-size: 1.1em; text-align: center;  color: #FFF; background-color: #57b174; border-radius: 2em; }

.share-btn-cart:hover{ text-decoration: none; color: #FFF; }

.complete-wrap div.container-fluid { background: #FFF; }



.navbar-app a.viewMyOrderBtn,.navbar-app a.back2homeBtn { display:inline-block; width: 42%; height: 35px; line-height: 35px; margin-top: 8px; font-size: 1em; color: #FFF; text-decoration: none; }

.navbar-app a.viewMyOrderBtn { background-color: #ff8135; }

.navbar-app a.viewMyOrderBtn:hover,.navbar-app a.back2homeBtn:hover,.navbar-app a.viewMyOrderBtn:active,.navbar-app a.back2homeBtn:active { color: #FFF; }

.navbar-app a.back2homeBtn { margin-right: 5%; background-color: #57b174;  }

.btn_complete_know { color: #FFFFFF; }

.btn_complete_know:hover,.btn_complete_know:active { color: #FFFFFF;}



.complete-footer { width: 100%; height: 50px;  background: #fcfaec; }

.complete-footer-inner { width: 90%; margin: 0 auto; text-align: center; }

</style>



<header class="mui-bar mui-bar-nav" style="z-index:7">

<<<<<<< HEAD
    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>

    <!-- <h1 class="mui-title">微信付款</h1> -->
<?php 

echo "body==="."$body";
	echo "</br>";
	
echo "openid==="."$openid";
	echo "</br>";
echo "<pre>";
echo "test==="."$test";
echo "</pre>";

?>
=======
    <!-- <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a> -->

    <!-- <h1 class="mui-title">微信付款</h1> -->

>>>>>>> df63b8e08acd14d1f9d8991f50e22eca3352cfef
</header>

<div class="mui-content ">

  <div class="complete-wrap" style="" >

		<div align="center">

			<p style="margin:20px auto;font-size:20px;">鲜果屋订单支付金额为<?php echo $info['pay_price']; ?>元 </p>

			<p style="font-size:24px;color:red;">￥<?php echo $info['pay_price']; ?></p>

			<div style="background-color:#fff;border:1px solid #ebebeb;line-height:30px;">

				<p>收款方：鲜果屋 </p>

				<p>商品名称：<?php echo $info['title']; ?></p>

			</div>

			<button style="margin-top:40px;width:90%; height:50px; border-radius: 15px;background-color:#26a731; border:1px #26a731 solid; cursor: pointer;  color:white;  font-size:16px;" type="button" onclick="callpay()" >立即支付</button>

		</div>

	</div>

</div>




</body>
</html>

<script type="text/javascript">



  $(function(){

      $('.complete-wrap').height($(window).height()-46)

  })

  //调用微信JS api 支付

	function jsApiCall()

	{

		WeixinJSBridge.invoke(

			'getBrandWCPayRequest',

			<?php echo $options; ?>,

			function(res){

				WeixinJSBridge.log(res.err_msg);

         if(res.err_msg == "get_brand_wcpay_request:ok" ) {

            mui.toast('支付成功')

<<<<<<< HEAD
            window.location.href = "<?php echo url('order/index', array('orderid'=>$info['id'])); ?>"
=======
            // window.location.href = "<?php echo url('order/index', array('orderid'=>$info['id'])); ?>"
             window.location.href = "<?php echo url('cart/paytest', array('orderid'=>$info['id'])); ?>"
>>>>>>> df63b8e08acd14d1f9d8991f50e22eca3352cfef

        }else if (res.err_msg == "get_brand_wcpay_request:cancel" ) {

          mui.toast('取消支付')

        }else{

          //mui.toast('支付失败，请重新或联系我们')

         mui.toast(res.err_code+'&'+res.err_desc+'&'+res.err_msg)

        }

        //  mui.toast(res.err_code+'&'+res.err_desc+'&'+res.err_msg)

        //mui.toast(res.err_msg)

			}

		);

	}



	function callpay()

	{

		if (typeof WeixinJSBridge == "undefined"){

		    if( document.addEventListener ){

		        document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);

		    }else if (document.attachEvent){

		        document.attachEvent('WeixinJSBridgeReady', jsApiCall);

		        document.attachEvent('onWeixinJSBridgeReady', jsApiCall);

		    }

		}else{

		    jsApiCall();

		}
		//alert("aabbcc");

	}





  $(function(){

      pushHistory();

      var bool=false;

      setTimeout(function(){

            bool=true;

      },1500);

      window.addEventListener("popstate", function(e) {

        if(bool)

          {



                  location.href="<?php echo url('index/order/index'); ?>";

          }

          pushHistory();



        }, false);

  });

  function pushHistory() {

    var state = {

        title: "title",

        url: "#"

    };

    window.history.pushState(state, "title", "#");

  }





  </script>



